import request from '@/config/axios'

// 入住登记 VO
export interface Check_InVO {
  id: number // 主键
  customerName: string // 客户姓名
  customerGender: string // 客户性别
  cardId: number // 身份证号
  roomId: number // 房间号
  inTime: Date // 入住时间
}

// 入住登记 API
export const Check_InApi = {
  // 查询入住登记分页
  getCheck_InPage: async (params: any) => {
    return await request.get({ url: `/yyzx/check_-in/page`, params })
  },

  // 查询入住登记详情
  getCheck_In: async (id: number) => {
    return await request.get({ url: `/yyzx/check_-in/get?id=` + id })
  },

  // 新增入住登记
  createCheck_In: async (data: Check_InVO) => {
    return await request.post({ url: `/yyzx/check_-in/create`, data })
  },

  // 修改入住登记
  updateCheck_In: async (data: Check_InVO) => {
    return await request.put({ url: `/yyzx/check_-in/update`, data })
  },

  // 删除入住登记
  deleteCheck_In: async (id: number) => {
    return await request.delete({ url: `/yyzx/check_-in/delete?id=` + id })
  },

  // 导出入住登记 Excel
  exportCheck_In: async (params) => {
    return await request.download({ url: `/yyzx/check_-in/export-excel`, params })
  },
}